Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YJIT: add code_region_overhead stat output #8262

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

maximecb
Copy link
Contributor

Investigating for Shopify#529, I thought it would be interesting to compute how many bytes in the code region are being unused, and to report what percentage of the total code region size this represents.

railsbench:

inline_code_size:          5,146,888
outlined_code_size:        3,766,480
code_region_size:          9,207,808
code_region_overhead:        294,440 ( 3.2%)

lobsters:

inline_code_size:         14,101,872
outlined_code_size:       10,151,248
code_region_size:         25,870,336
code_region_overhead:      1,617,216 ( 6.3%)

Some potential savings there, though it's not as bad as I thought. I'm actually surprised we're wasting this little space. I'm assuming here that the code region size is the total amount of space (pages) we've allocated for machine code.

@matzbot matzbot requested a review from a team August 22, 2023 18:02
@maximecb maximecb merged commit c23e2e1 into ruby:master Aug 22, 2023
93 checks passed
@maximecb maximecb deleted the yjit_code_overhead branch August 22, 2023 21:36
@k0kubun
Copy link
Member

k0kubun commented Aug 22, 2023

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants